﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), 
    Guid("00020400-0000-0000-C000-000000000046")]
    public interface IDispatch
    {
        [return: MarshalAs(UnmanagedType.U4)]
        int GetTypeInfoCount();
        [return: MarshalAs(UnmanagedType.Interface)]
        ITypeInfo GetTypeInfo([In, MarshalAs(UnmanagedType.U4)] int iTInfo, [In, MarshalAs(UnmanagedType.U4)] int lcid);
        [PreserveSig]
        int GetIDsOfNames([In] ref Guid riid,[In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr)] string[] rgszNames,[In] int cNames,[In] int lcid,[Out] out int rgDispId);
        [PreserveSig]
        int Invoke(int dispIdMember, [In] ref Guid riid, [In, MarshalAs(UnmanagedType.U4)] int lcid, [In, MarshalAs(UnmanagedType.U4)] int dwFlags, [In, Out] tagDISPPARAMS pDispParams, [Out, MarshalAs(UnmanagedType.LPArray)] object[] pVarResult, [In, Out] tagEXCEPINFO pExcepInfo, out IntPtr pArgErr);
    }
}
